#include<stdio.h>
void main()
{
	int year = 2000;
	int n = 0;
	while (year<=3000)
	{
		if (year%4==0&&year%100!=0)
		{
			printf("%d\t",year);
			n++;
		}
	
		if (n%10 == 0)
		{
			printf("\n");
		}
	year++;
}
}